export function resetForm (obj) {
  for (let col in obj) {
    obj[col] = ''
  }
}

export function formatHeader (obj) {
  let header = []
  for (let i in obj) {
    let col = obj[i].value
    header.push({ name: col, label: obj[i].text, field: col, sortable: true })
  }
  return header
}

export function dateFormat (date) {
  let year = date.getFullYear(),
    month = date.getMonth() + 1,
    day = date.getDate(),
    hour = date.getHours(),
    min = date.getMinutes()
  let newTime = year + '-' +
    month + '-' +
    day + ' ' +
    hour + ':' +
    min
  return newTime
}

export default {
}
